@if (isLoading) {
  <div class="flex justify-center items-center h-screen relative">
    <p-progressSpinner></p-progressSpinner>
  </div>
}

@if (!isLoading) {
  <ngx-extended-pdf-viewer
    [src]="bookData"
    [textLayer]="true"
    [showHandToolButton]="true"
    [handTool]="false"
    [height]="'auto'"
    [page]="page"
    [rotation]="rotation"
    [sidebarVisible]="false"
    [zoom]="zoom"
    [spread]="spread"
    [showBookModeButton]="false"
    [showDownloadButton]="showDownloadButton"
    [showPrintButton]="showPrintButton"
    (pagesLoaded)="onPdfPagesLoaded($event)"
    (pageChange)="onPageChange($event)"
    (zoomChange)="onZoomChange($event)"
    (spreadChange)="onSpreadChange($event)">
  </ngx-extended-pdf-viewer>
}
